﻿
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Verse;

namespace SZ.Mech
{
    public class SZCompProperties_EmptyStateGraphic : RimWorld.CompProperties_EmptyStateGraphic
    {
        public SZCompProperties_EmptyStateGraphic()
        {
            compClass = typeof(CompEmptyStateGraphic);
        }
    }
     
    public class SZCompEmptyStateGraphic : RimWorld.CompEmptyStateGraphic
    {
        private SZCompProperties_EmptyStateGraphic Props => (SZCompProperties_EmptyStateGraphic)props;
        public override void PostDraw()
        {
            base.PostDraw();
            Test();
            if (ParentIsEmpty)
            {
                
            }
        }

        public bool Test()
        {
            if (parent is Building_Casket building_Casket && !building_Casket.HasAnyContents)
            {
                return true;
            }
            CompPawnSpawnOnWakeup compPawnSpawnOnWakeup = parent.TryGetComp<CompPawnSpawnOnWakeup>();
            if (compPawnSpawnOnWakeup != null && !compPawnSpawnOnWakeup.CanSpawn)
            {
                return true;
            }
            return false;
        }
    }
}
